Document how to run additional delayed job workers

Dominik Sander 8 years ago
parent
commit
82566130b6
6 changed files with 30 additions and 9 deletions
  1. 25 6
      Procfile
  2. 0 0
      doc/configuration/dotenv.md
  3. 0 0
      doc/configuration/procfile.md
  4. 1 1
      doc/install/README.md
  5. 2 0
      doc/install/installation.md
  6. 2 2
      doc/update/README.md

+ 25 - 6
Procfile

@@ -1,6 +1,6 @@
1
-#################
2
-# DEVELOPMENT   #
3
-#################
1
+###############################
2
+#         DEVELOPMENT         #
3
+###############################
4 4
 
5 5
 # Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
6 6
 web: bundle exec rails server -b0.0.0.0
@@ -12,9 +12,9 @@ jobs: bundle exec rails runner bin/threaded.rb
12 12
 # twitter: bundle exec rails runner bin/twitter_stream.rb
13 13
 # dj: bundle exec script/delayed_job run
14 14
 
15
-#################
16
-# PRODUCTION    #
17
-#################
15
+###############################
16
+#         PRODUCTION          #
17
+###############################
18 18
 
19 19
 # Using the threaded worker (consumes less RAM but can run slower)
20 20
 # web: bundle exec unicorn -c config/unicorn.rb
@@ -25,3 +25,22 @@ jobs: bundle exec rails runner bin/threaded.rb
25 25
 # schedule: bundle exec rails runner bin/schedule.rb
26 26
 # twitter: bundle exec rails runner bin/twitter_stream.rb
27 27
 # dj: bundle exec script/delayed_job run
28
+
29
+###############################
30
+# Multiple DelayedJob workers #
31
+###############################
32
+# Per default Huginn can just run one agent at a time. Using a lot of agents or calling slow
33
+# external services frequently might require more DelayedJob workers (an indicator for this is
34
+# a backlog in your 'Job Management' page).
35
+# Every uncommented line starts an additional DelayedJob worker. This works for development, production
36
+# and for the threaded and separate worker processes. Keep in mind one worker needs about 300MB of RAM.
37
+#
38
+#dj2: bundle exec script/delayed_job -i 2 run
39
+#dj3: bundle exec script/delayed_job -i 3 run
40
+#dj4: bundle exec script/delayed_job -i 4 run
41
+#dj5: bundle exec script/delayed_job -i 5 run
42
+#dj6: bundle exec script/delayed_job -i 6 run
43
+#dj7: bundle exec script/delayed_job -i 7 run
44
+#dj8: bundle exec script/delayed_job -i 8 run
45
+#dj9: bundle exec script/delayed_job -i 9 run
46
+#dj10: bundle exec script/delayed_job -i 10 run

+ 0 - 0
doc/configuration/dotenv.md


+ 0 - 0
doc/configuration/procfile.md


+ 1 - 1
doc/install/README.md

@@ -2,4 +2,4 @@
2 2
 
3 3
 - [Requirements](requirements.md) Software and hardware requirements to run the Huginn installation
4 4
 - [Install](installation.md) Installation guide for Ubundu/Debian
5
-- [Update](update.md) Update an existing Huginn installation
5
+- [Update](../update/README.md) Update an existing Huginn installation

+ 2 - 0
doc/install/installation.md

@@ -13,6 +13,8 @@ The following steps have been known to work. Please **use caution when you devia
13 13
 
14 14
 If you find a bug/error in this guide please **submit a merge request**.
15 15
 
16
+If not stated otherwise all commands should be run as user with sudo permissions or as root.
17
+
16 18
 ## Overview
17 19
 
18 20
 The Huginn installation consists of setting up the following components:

+ 2 - 2
doc/update/README.md

@@ -75,13 +75,13 @@ sudo -u huginn -H editor .env
75 75
 ```
76 76
 
77 77
 
78
-### 6. Export init script and start huginn
78
+### 6. Export init script and start Huginn
79 79
 
80 80
 ```
81 81
 # Export the init script
82 82
 sudo rm /etc/init/huginn*
83 83
 sudo foreman export upstart -a huginn /etc/init
84
-# Start huginn
84
+# Start Huginn
85 85
 sudo start huginn
86 86
 ```
87 87